<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html"/>
<xsl:template match="/">
   <html>
       <head>
           <title>
               Песни - <xsl:value-of select="/library/name"/>
           </title>
       </head>
       <body  style="color:black" bgcolor ="#BFEFFF">
           <h1>Име на музикалната библиотека:  <xsl:value-of select="/library/name"/></h1>  
           <h3><xsl:value-of select="library/description/info"/>  <br/></h3>
           <h3>Брой песни: <xsl:value-of select="/library/description/songCount"/></h3>
           
           <xsl:apply-templates select="library/songs/song" />
           <br/>
           <h3>Изпълнители</h3>
           <xsl:apply-templates select="library/artists"/>
       </body>
   </html>
</xsl:template>
    
    <xsl:template match="song"> <br/>
        <div style="background-color: #cfff55">
            <i>Заглавие: </i><b><xsl:value-of select="title"/></b> <br/>
            <i>Bitrate: </i>   <xsl:value-of select="bitrate"/> <br/>
            <i>Дължина: </i>  <xsl:value-of select="lenght"/> <br/>
            <i>Размер : </i>  <xsl:value-of select="size"/> <xsl:text> </xsl:text> <xsl:value-of select="size/@metrics"/><br/>
            <i>Стил: </i>  <xsl:value-of select="@style"/> <br/>
           
        </div>
    </xsl:template>
    
    <xsl:template match="artists">
        <xsl:for-each select="artist">
            <div style="background-color: #afff59">
                <i>Име: </i><b><xsl:value-of select="firstName"/></b><xsl:text> </xsl:text><xsl:value-of select="lastName"/> <br/>
                <i>Години: </i>  <xsl:value-of select="age"/> <br/>
                <i>Националност: </i>  <xsl:value-of select="nationality"/> <br/>
                <i>Стил музика: </i>  <xsl:value-of select="musicStyle"/> <br/><br/>
            </div>
             
        </xsl:for-each>
    </xsl:template>  
 
</xsl:stylesheet>
